home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 08 - 1992 / 08.02 Jun 92 / Simple Antivirus Protection / ResCounts.r < prev    next >
Encoding:
Text File  |  1992-05-20  |  2.0 KB  |  105 lines  |  [TEXT/MPS ]

  1. #include "Types.r"
  2.  
  3. /* Number of Kinds of Rsrcs and Counts of Specific rsrcs. */
  4.  
  5. /*------???? • Resource Count Information Template-------*/
  6. type '????' {
  7.         wide array RKEYlist {        /* List of items            */
  8.             longint;                         /* Resource type            */
  9.             integer;                        /* Resource Number        */
  10.         };
  11. };
  12.  
  13.  
  14. /* Total Count of Code Resources & Total Count of Resource
  15.     Types as a Virus Detection aid. */
  16. resource '????' (32) {
  17.     {
  18.         /* (Substitute your own values in this resource) */
  19.         0, 5;                        /* # of kinds of Resources */
  20.         'CODE', 4;                /* number of 'CODE' resources */
  21.         'MDEF', 1;                /* number of 'MDEF' resources */
  22.     }
  23. };
  24.  
  25.  
  26.  
  27. /* Virus Alert! */
  28. resource 'ALRT' (1282, purgeable) {
  29.     {100, 120, 305, 460},
  30.     1282,
  31.     {    /* array: 4 elements */
  32.         /* [1] */
  33.         OK, visible, sound1,
  34.         /* [2] */
  35.         OK, visible, sound1,
  36.         /* [3] */
  37.         OK, visible, sound1,
  38.         /* [4] */
  39.         OK, visible, sound1
  40.     }
  41. };
  42.  
  43. resource 'DITL' (1282, purgeable) {
  44.     {    /* array DITLarray: 2 elements */
  45.         /* [1] */
  46.         {160, 150, 180, 210},
  47.         Button {
  48.             enabled,
  49.             "OK"
  50.         },
  51.         /* [2] */
  52.         {15, 65, 150, 325},
  53.         StaticText {
  54.             disabled,
  55.             "!!!  Virus Alert !!!\nApplication has detected a "
  56.             "miscount of ^0, possibly caused by being infected"
  57.             " with a Virus. Run a Virus Protection Program aga"
  58.             "inst your System and this copy of the Application"
  59.             " and/or reinstall the Application."
  60.         }
  61.     }
  62. };
  63.  
  64. /* Virus Not Found Alert! */
  65. resource 'ALRT' (1283, purgeable) {
  66.     {100, 120, 195, 350},
  67.     1283,
  68.     {    /* array: 4 elements */
  69.         /* [1] */
  70.         OK, visible, sound1,
  71.         /* [2] */
  72.         OK, visible, sound1,
  73.         /* [3] */
  74.         OK, visible, sound1,
  75.         /* [4] */
  76.         OK, visible, sound1
  77.     }
  78. };
  79.  
  80. resource 'DITL' (1283, purgeable) {
  81.     {    /* array DITLarray: 2 elements */
  82.         /* [1] */
  83.         {60, 90, 80, 150},
  84.         Button {
  85.             enabled,
  86.             "OK"
  87.         },
  88.         /* [2] */
  89.         {15, 65, 45, 205},
  90.         StaticText {
  91.             disabled,
  92.             "All is well!"
  93.         }
  94.     }
  95. };
  96.  
  97. /* Substitution strings to go in ^0 in the above dialog */
  98. resource 'STR#' (1282, purgeable) {
  99.     {
  100.         "its ‘????’ Resource";    /* (Use the count Rsrc. kind) */
  101.         "all its Resource Types";
  102.         "its ‘^1’ Resources"
  103.     }
  104. };
  105.